<!DOCTYPE html>
<html class="no-js" lang="zh-CN">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>Posts - home</title>
	<script>(function(d,e){d[e]=d[e].replace("no-js","js");})(document.documentElement,"className");</script>
	<meta name="description" content="">
	<meta name="generator" content="Hugo 0.54.0" />
	<meta property="og:title" content="Posts" />
<meta property="og:description" content="pdc&#39;s Personal blog about something" />
<meta property="og:type" content="website" />
<meta property="og:url" content="/post/" />

<meta property="og:updated_time" content="2019-04-09T00:00:00&#43;00:00"/>

	
	<link rel="dns-prefetch" href="//fonts.googleapis.com">
	<link rel="dns-prefetch" href="//fonts.gstatic.com">
	<link rel="alternate" type="application/rss+xml" href="/post/index.xml" title="home">
	<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700">
	<link rel="stylesheet" href="/css/style.css">
	<link rel="stylesheet" href="/css/custom.css">
	<link rel="shortcut icon" href="/favicon.ico">
		
</head>
<body class="body">
	<div class="container container--outer">
		<header class="header">
	<div class="container">
		<div class="logo">
			<a class="logo__link" href="/" title="home" rel="home">
				<div class="logo__title">home</div>
				
			</a>
		</div>
		
<nav class="menu">
	<button class="menu__btn" aria-haspopup="true" aria-expanded="false" tabindex="0">
		<span class="menu__btn-title" tabindex="-1">Menu</span>
	</button>
	<ul class="menu__list">
		<li class="menu__item">
			<a class="menu__link" href="/about/">about</a>
		</li>
		<li class="menu__item">
			<a class="menu__link" href="/post/2020-05-26-%E6%90%9C%E7%B4%A2%E6%8A%80%E5%B7%A7/">搜索技巧</a>
		</li>
		<li class="menu__item">
			<a class="menu__link" href="/post/2019-04-13-vim%E5%B8%B8%E8%A7%84%E4%BD%BF%E7%94%A8/">vim常规使用</a>
		</li>
		<li class="menu__item">
			<a class="menu__link" href="/post/2020-05-21-%E5%AD%A6%E4%B9%A0%E5%9B%BE/">学习图</a>
		</li>
	</ul>
</nav>

	</div>
</header>
		<div class="wrapper flex">
			<div class="primary">
			
<main class="main list" role="main">
	<header class="main__header">
		<h1 class="main__title">Posts</h1>
	</header><article class="list__item post">
	<figure class="list__thumbnail">
		<a href="/post/2019-04-09-hugo/">
			<img src="/img/hugo.png" alt="Hugo" />
		</a>
	</figure>
	<header class="list__header">
		<h3 class="list__title post__title ">
			<a href="/post/2019-04-09-hugo/" rel="bookmark">
			Hugo
			</a>
		</h3>
		<div class="list__meta meta">
<div class="meta__item-datetime meta__item">
	<svg class="meta__icon icon icon-time" width="16" height="14" viewBox="0 0 30 28"><path d="M15 0C7 0 1 6 1 14s6 14 14 14 14-6 14-14S23 0 15 0zm0 25C9 25 4 20 4 14S9 3 15 3s11 5 11 11-5 11-11 11zm1-18h-2v8.4l6.8 4.4L22 18l-6-3.8V7z"/></svg>
	<time class="meta__text" datetime="2019-04-09T00:00:00">2019-04-09</time>
</div>
</div>
	</header>
	<div class="content list__excerpt post__content clearfix">
		什么是hugo？ Hugo是由Go语言实现的静态网站生成器。简单、易用、高效、易扩展、快速部署。
安装hugo github上各版本
mac安装 brew insall hugo
linux安装 cd /data/pkg/ wget https://github.com/gohugoio/hugo/releases/download/v0.55.0/hugo_0.55.0_Linux-64bit.tar.gz tar -vxf hugo_0.55.0_Linux-64bit.tar.gz ln -s /data/pkg/hugo /usr/local/bin/hugo ln -s /usr/local/bin/hugo /bin/hugo  源码安装 下载源码，go build相关命令即可编译出，不详细操作。
使用hugo 使用帮助：hugo --help
本地website：hugo server --theme=mainroad --bind=0.0.0.0，需要建立content文件夹放.md文件。
生成静态网页部署到个人站点：hugo --theme=mainroad，静态网页在publish文件夹内，可放到github仓库根目录作为个人站点使用。
 &ndash;theme 为主题名称
 hugo themes 主题地址，主题比较丰富，文档也较全，一般参考主题下的demo配置即可。如需熟练使用，还需熟悉hugo官方各文档，体验各主题之间差异，亦或自己构建主题都可。
hugo参数介绍参考 官网参数介绍，参数较多，各主题使用参数基本类似。
hugo使用mainroad主题 mainroad 文档
mainroad集成google统计 只需在配置文件config.toml配置googleAnalytics = &quot;xxx&quot;参数即可，xxx为google tracking id。配置好后即可统计网站流量。
mainroad集成Disqus 只需在配置文件config.toml配置disqusShortname = &quot;xxx&quot;参数即可，xxx为disqus的short name。配置好后，即可开启评论回复等功能。 效果图: .md文件配置示例 --- title: &quot;(Hu)go Template Primer&quot; date: 2014-04-02 thumbnail: &quot;img/placeholder.
	</div>
	<div class="list__footer clearfix">
		<a class="list__footer-readmore btn" href="/post/2019-04-09-hugo/">Read more…</a>
	</div>
</article><article class="list__item post">
	<header class="list__header">
		<h3 class="list__title post__title ">
			<a href="/post/2019-04-08-github%E7%AD%89%E6%95%B4%E7%90%86%E7%9A%84%E8%B5%84%E6%96%99/" rel="bookmark">
			github等整理的资料
			</a>
		</h3>
		<div class="list__meta meta">
<div class="meta__item-datetime meta__item">
	<svg class="meta__icon icon icon-time" width="16" height="14" viewBox="0 0 30 28"><path d="M15 0C7 0 1 6 1 14s6 14 14 14 14-6 14-14S23 0 15 0zm0 25C9 25 4 20 4 14S9 3 15 3s11 5 11 11-5 11-11 11zm1-18h-2v8.4l6.8 4.4L22 18l-6-3.8V7z"/></svg>
	<time class="meta__text" datetime="2019-04-08T00:00:00">2019-04-08</time>
</div>
</div>
	</header>
	<div class="content list__excerpt post__content clearfix">
		containers  k8s go client  数学  MIT-18.06-线性代数-完整笔记  java  SpringBoot-Learning 循序渐进，学习Spring Boot、Spring Boot &amp; Shiro、Spring Cloud和Spring Security，博客Spring系列源码 Spring Cloud 学习案例，服务发现、服务治理、链路追踪、服务监控等 Lock-Learning 互联网 Java 工程师进阶知识完全扫盲 java学习/面试指南 后端架构师技术图谱  数据结构，算法等  用动画的形式呈现解LeetCode题目的思路 数据结构与算法/leetcode/lintcode题解 算法珠玑 剑指Offer——名企面试官精讲典型编程题 algorithms  linux  linux command linux内核揭秘  flutter  flutter-go demo flutter example apps flutter examples  golang  go语言圣经 go高级编程 go web kcp yamux go脚本 go项目  python  Python-100天  nginx  Nginx Quick Reference] Nginx Config nginx从入门到精通  monitor  grafana-dashboards prometheus mysqld_exporter grafana prometheus  testing  HTTP load generator, ApacheBench (ab) replacement, formerly known as rakyll/boom  devops  ansible examples  proxy  v2ray  hack  micro8  ebook  https://github.
	</div>
	<div class="list__footer clearfix">
		<a class="list__footer-readmore btn" href="/post/2019-04-08-github%E7%AD%89%E6%95%B4%E7%90%86%E7%9A%84%E8%B5%84%E6%96%99/">Read more…</a>
	</div>
</article><article class="list__item post">
	<header class="list__header">
		<h3 class="list__title post__title ">
			<a href="/post/2019-04-08-%E5%B8%B8%E7%94%A8%E8%BD%AF%E4%BB%B6%E5%AE%89%E8%A3%85/" rel="bookmark">
			常用软件、工具安装
			</a>
		</h3>
		<div class="list__meta meta">
<div class="meta__item-datetime meta__item">
	<svg class="meta__icon icon icon-time" width="16" height="14" viewBox="0 0 30 28"><path d="M15 0C7 0 1 6 1 14s6 14 14 14 14-6 14-14S23 0 15 0zm0 25C9 25 4 20 4 14S9 3 15 3s11 5 11 11-5 11-11 11zm1-18h-2v8.4l6.8 4.4L22 18l-6-3.8V7z"/></svg>
	<time class="meta__text" datetime="2019-04-08T00:00:00">2019-04-08</time>
</div>

<div class="meta__item-categories meta__item">
	<svg class="meta__icon icon icon-category" width="16" height="16" viewBox="0 0 16 16"><path d="m7 2l1 2h8v11h-16v-13z"/></svg>
	<span class="meta__text"><a class="meta__link" href="/categories/install" rel="category">install</a></span>
</div>
</div>
	</header>
	<div class="content list__excerpt post__content clearfix">
		其他工具 mac  brew install ruby - 替换系统默认的ruby环境，不然很多操作都要加sudo brew install nginx brew install automake brew install iproute2mac - 替换net-tools工具 brew install openssl brew install jq - json处理 brew install glide - go包管理工具 brew install mariadb - mysql客户端 brew install tldr - 查看命令示例，man的文档太长 brew install fd - find命令的升级版，更加高效 brew install http - curl、wget工具的替换，like tool for humans brew install tmux - 类screen  centos  yum install epel-release - 安装最新软件包源 yum install -y nginx yum install -y lsof telnet tcpdump iproute2 yum install -y mariadb - mysql客户端 yum install -y &quot;Development Tools&quot; - 开发工具包  ubuntu  apt-get install iputils-ping  alpine  apk add busybox-extras  git  npm install -g commitizen - commit规范化  安装docker-ce 脚本一键安装 curl -fsSL https://get.
	</div>
	<div class="list__footer clearfix">
		<a class="list__footer-readmore btn" href="/post/2019-04-08-%E5%B8%B8%E7%94%A8%E8%BD%AF%E4%BB%B6%E5%AE%89%E8%A3%85/">Read more…</a>
	</div>
</article><article class="list__item post">
	<header class="list__header">
		<h3 class="list__title post__title ">
			<a href="/post/2019-01-10-mysql-tips/" rel="bookmark">
			mysql tips
			</a>
		</h3>
		<div class="list__meta meta">
<div class="meta__item-datetime meta__item">
	<svg class="meta__icon icon icon-time" width="16" height="14" viewBox="0 0 30 28"><path d="M15 0C7 0 1 6 1 14s6 14 14 14 14-6 14-14S23 0 15 0zm0 25C9 25 4 20 4 14S9 3 15 3s11 5 11 11-5 11-11 11zm1-18h-2v8.4l6.8 4.4L22 18l-6-3.8V7z"/></svg>
	<time class="meta__text" datetime="2019-01-10T00:00:00">2019-01-10</time>
</div>

<div class="meta__item-categories meta__item">
	<svg class="meta__icon icon icon-category" width="16" height="16" viewBox="0 0 16 16"><path d="m7 2l1 2h8v11h-16v-13z"/></svg>
	<span class="meta__text"><a class="meta__link" href="/categories/%e6%95%b0%e6%8d%ae%e5%ba%93" rel="category">数据库</a>, <a class="meta__link" href="/categories/tips" rel="category">tips</a></span>
</div>
</div>
	</header>
	<div class="content list__excerpt post__content clearfix">
		mysql常用操作 # curd等 insert into table_name values (xx,xx,xx); select *from table_name; update table_name set a=xx, b=xx where c=xx; delete from table_name where a=xx; explain select *from a=xxx; # 状态、参数、表信息等 # 官网show命令：https://dev.mysql.com/doc/refman/8.0/en/show.html show indexes from table_name; show status like 'slow_queries'; show status like 'connections' ; show status like 'threads%'; Show status like 'slow_queries' or like 'connections' or like 'threads'; show variables like '%default%'; show engine innodb status; show processlist; analyze table table_name;  mysql索引  聚簇索引（保存整条记录） 普通索引（保存主键，然后回表查询记录） 下推索引（mysql 5.
	</div>
	<div class="list__footer clearfix">
		<a class="list__footer-readmore btn" href="/post/2019-01-10-mysql-tips/">Read more…</a>
	</div>
</article><article class="list__item post">
	<header class="list__header">
		<h3 class="list__title post__title ">
			<a href="/post/2019-01-06-grafana_prometheus_%E5%88%9D%E4%BD%93%E9%AA%8C/" rel="bookmark">
			grafana、prometheus初体验
			</a>
		</h3>
		<div class="list__meta meta">
<div class="meta__item-datetime meta__item">
	<svg class="meta__icon icon icon-time" width="16" height="14" viewBox="0 0 30 28"><path d="M15 0C7 0 1 6 1 14s6 14 14 14 14-6 14-14S23 0 15 0zm0 25C9 25 4 20 4 14S9 3 15 3s11 5 11 11-5 11-11 11zm1-18h-2v8.4l6.8 4.4L22 18l-6-3.8V7z"/></svg>
	<time class="meta__text" datetime="2019-01-06T00:00:00">2019-01-06</time>
</div>

<div class="meta__item-categories meta__item">
	<svg class="meta__icon icon icon-category" width="16" height="16" viewBox="0 0 16 16"><path d="m7 2l1 2h8v11h-16v-13z"/></svg>
	<span class="meta__text"><a class="meta__link" href="/categories/monitor" rel="category">monitor</a></span>
</div>
</div>
	</header>
	<div class="content list__excerpt post__content clearfix">
		测试机：阿里云抢占式实例 centos 7.5
外网ip：47.107.169.xxx
内网ip：172.18.201.49
1.安装docker：  阿里源安装
 https://yq.aliyun.com/articles/110806?spm=5176.8351553.0.0.ad631991oPQ1ue
# step 1: 安装必要的一些系统工具 sudo yum install -y yum-utils device-mapper-persistent-data lvm2 # Step 2: 添加软件源信息 sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo # Step 3: 更新并安装 Docker-CE sudo yum makecache fast sudo yum -y install docker-ce # Step 4: 开启Docker服务 sudo systemctl start docker   官网一键脚本安装文档
 https://docs.docker.com/install/linux/docker-ce/centos/#install-using-the-convenience-script
2.node_exporter  参考
 https://github.com/prometheus/node_exporter
 安装
 wget https://github.com/prometheus/node_exporter/releases/download/v0.17.0/node_exporter-0.17.0.linux-amd64.tar.gz tar xvfz node_exporter-0.17.0.linux-amd64.tar.gz cd node_exporter-0.
	</div>
	<div class="list__footer clearfix">
		<a class="list__footer-readmore btn" href="/post/2019-01-06-grafana_prometheus_%E5%88%9D%E4%BD%93%E9%AA%8C/">Read more…</a>
	</div>
</article><article class="list__item post">
	<header class="list__header">
		<h3 class="list__title post__title ">
			<a href="/post/2018-09-25-mongodb%E4%B8%BB%E4%BB%8E%E4%B8%8D%E5%BB%BA%E8%AE%AE%E4%BD%BF%E7%94%A8/" rel="bookmark">
			mongodb主从(不建议使用)
			</a>
		</h3>
		<div class="list__meta meta">
<div class="meta__item-datetime meta__item">
	<svg class="meta__icon icon icon-time" width="16" height="14" viewBox="0 0 30 28"><path d="M15 0C7 0 1 6 1 14s6 14 14 14 14-6 14-14S23 0 15 0zm0 25C9 25 4 20 4 14S9 3 15 3s11 5 11 11-5 11-11 11zm1-18h-2v8.4l6.8 4.4L22 18l-6-3.8V7z"/></svg>
	<time class="meta__text" datetime="2018-09-25T00:00:00">2018-09-25</time>
</div>

<div class="meta__item-categories meta__item">
	<svg class="meta__icon icon icon-category" width="16" height="16" viewBox="0 0 16 16"><path d="m7 2l1 2h8v11h-16v-13z"/></svg>
	<span class="meta__text"><a class="meta__link" href="/categories/%e6%95%b0%e6%8d%ae%e5%ba%93" rel="category">数据库</a></span>
</div>
</div>
	</header>
	<div class="content list__excerpt post__content clearfix">
		参考资料 官网 master-slave
mongodb的主从要注意的事项  主服务器挂掉，从服务器不会自动取代主服务器。 主服务器挂掉后重启，从服务器则会重新同步数据，之前同步过来的数据被初始化。 综合以上两点，mongodb要随时做好数据备份，以免造成无法弥补的数据丢失！！！  master docker run -v ~/docker/test/mongo/test1/data/:/data/db -p 27001:27017 --name master_mongo --network docker_default mongo:3.2 mongod --dbpath /data/db --master  slave docker run -v ~/docker/test/mongo/test2/data/:/data/db -p 27002:27017 --name slave_mongo --network docker_default mongo:3.2 mongod --dbpath /data/db --slave --source 192.168.1.222:27001   &ndash;only 可指定database &ndash;slavedelay &ndash;fastsyn &ndash;aoturesync &ndash;oplogSize   也可先创建从节点(slave)
docker run -v ~/docker/test/mongo/test3/data/:/data/db -p 27003:27017 --name slave1_mongo --network docker_default mongo:3.2 mongod --dbpath /data/db --slave  然后再指定master
	</div>
	<div class="list__footer clearfix">
		<a class="list__footer-readmore btn" href="/post/2018-09-25-mongodb%E4%B8%BB%E4%BB%8E%E4%B8%8D%E5%BB%BA%E8%AE%AE%E4%BD%BF%E7%94%A8/">Read more…</a>
	</div>
</article><article class="list__item post">
	<header class="list__header">
		<h3 class="list__title post__title ">
			<a href="/post/2018-09-26-mongodb%E5%88%86%E7%89%87/" rel="bookmark">
			mongodb分片
			</a>
		</h3>
		<div class="list__meta meta">
<div class="meta__item-datetime meta__item">
	<svg class="meta__icon icon icon-time" width="16" height="14" viewBox="0 0 30 28"><path d="M15 0C7 0 1 6 1 14s6 14 14 14 14-6 14-14S23 0 15 0zm0 25C9 25 4 20 4 14S9 3 15 3s11 5 11 11-5 11-11 11zm1-18h-2v8.4l6.8 4.4L22 18l-6-3.8V7z"/></svg>
	<time class="meta__text" datetime="2018-09-25T00:00:00">2018-09-25</time>
</div>

<div class="meta__item-categories meta__item">
	<svg class="meta__icon icon icon-category" width="16" height="16" viewBox="0 0 16 16"><path d="m7 2l1 2h8v11h-16v-13z"/></svg>
	<span class="meta__text"><a class="meta__link" href="/categories/%e6%95%b0%e6%8d%ae%e5%ba%93" rel="category">数据库</a></span>
</div>
</div>
	</header>
	<div class="content list__excerpt post__content clearfix">
		参考资料 官网术语glossary 官网Configuration File文档 官网教程tutorial 官网Replication文档 官网sharding文档 官网mongodb生态
张友东的博客 【csdn】MongoDB 分片的原理、搭建、应用
分片架构 一、分片（shard server） 配置文件sharding-config.yml systemLog: destination: file # 值只有三个syslog，console，file path: /data/db/mongo-standard.log #标准日志文件 logAppend: true #日志是否追加 storage: dbPath: /data/db/ #数据目录 # syncPeriodSecs: 60 #这个参数做好不要设置，使用默认设置就好，默认60秒 journal: enabled: true #是否开启日志刷入磁盘 commitIntervalMs: 200 #从磁盘刷入时间间隔，为毫秒 net: port: 27017 #启动端口 #processManagement: #fork: true #是否启用守护进程 #pidFilePath: /data/db/mongo.pid #mongos或mongod进程id文件，配合fork使用 replication: oplogSizeMB: 1000 #复制集操作日志oplog大小 # replSetName: name #复制集的名称，复制集必须要有一个名称 security: authorization: disabled #开启验证，默认disabled # mongod才有这个配置，mongos没有 sharding: clusterRole: shardsvr #分片集群角色，configsvr为配置服务器（默认启动端口 27019），shardsvr为分片服务器（默认启动端口 27018） archiveMovedChunks: false #true, 在move chunk 时，源 shard 会将迁移的 chunk 数据归档一份在数据目录里，会占用磁盘空间  三个片区  分片一：
	</div>
	<div class="list__footer clearfix">
		<a class="list__footer-readmore btn" href="/post/2018-09-26-mongodb%E5%88%86%E7%89%87/">Read more…</a>
	</div>
</article><article class="list__item post">
	<header class="list__header">
		<h3 class="list__title post__title ">
			<a href="/post/2018-09-25-mongodb%E5%89%AF%E6%9C%AC%E9%9B%86%E5%BB%BA%E8%AE%AE%E4%BD%BF%E7%94%A8/" rel="bookmark">
			mongodb副本集（建议使用）
			</a>
		</h3>
		<div class="list__meta meta">
<div class="meta__item-datetime meta__item">
	<svg class="meta__icon icon icon-time" width="16" height="14" viewBox="0 0 30 28"><path d="M15 0C7 0 1 6 1 14s6 14 14 14 14-6 14-14S23 0 15 0zm0 25C9 25 4 20 4 14S9 3 15 3s11 5 11 11-5 11-11 11zm1-18h-2v8.4l6.8 4.4L22 18l-6-3.8V7z"/></svg>
	<time class="meta__text" datetime="2018-09-25T00:00:00">2018-09-25</time>
</div>

<div class="meta__item-categories meta__item">
	<svg class="meta__icon icon icon-category" width="16" height="16" viewBox="0 0 16 16"><path d="m7 2l1 2h8v11h-16v-13z"/></svg>
	<span class="meta__text"><a class="meta__link" href="/categories/%e6%95%b0%e6%8d%ae%e5%ba%93" rel="category">数据库</a></span>
</div>
</div>
	</header>
	<div class="content list__excerpt post__content clearfix">
		架构图  主节点挂了之后，会自动选举主节点
 docker创建network driver为bridge，注意网段可能冲突
docker network create -d bridge --subnet 172.11.0.0/24 mongo_network  启动为双节点 docker run -d -v ~/docker/test/mongo/test1/data/:/data/db -p 27001:27017 --ip 172.11.0.2 --name master_mongo --network mongo_network mongo:3.2 mongod --dbpath /data/db --replSet repl0 docker run -d -v ~/docker/test/mongo/test2/data/:/data/db -p 27002:27017 --ip 172.11.0.3 --name slave_mongo --network mongo_network mongo:3.2 mongod --dbpath /data/db --replSet repl0  初始化 rs.initiate({_id:'repl0',members:[ {_id:0,host:'172.11.0.2:27017'}, {_id:1,host:'172.11.0.3:27017'}]})  添加新节点 # 添加新节点 rs.add('172.11.0.4:27017') # 添加选举节点 # rs.add('172.11.0.5:27017') # 刷新配置 rs.
	</div>
	<div class="list__footer clearfix">
		<a class="list__footer-readmore btn" href="/post/2018-09-25-mongodb%E5%89%AF%E6%9C%AC%E9%9B%86%E5%BB%BA%E8%AE%AE%E4%BD%BF%E7%94%A8/">Read more…</a>
	</div>
</article><article class="list__item post">
	<header class="list__header">
		<h3 class="list__title post__title ">
			<a href="/post/2018-09-23-rinetd-%E8%BD%AC%E5%8F%91/" rel="bookmark">
			rinetd转发
			</a>
		</h3>
		<div class="list__meta meta">
<div class="meta__item-datetime meta__item">
	<svg class="meta__icon icon icon-time" width="16" height="14" viewBox="0 0 30 28"><path d="M15 0C7 0 1 6 1 14s6 14 14 14 14-6 14-14S23 0 15 0zm0 25C9 25 4 20 4 14S9 3 15 3s11 5 11 11-5 11-11 11zm1-18h-2v8.4l6.8 4.4L22 18l-6-3.8V7z"/></svg>
	<time class="meta__text" datetime="2018-09-23T00:00:00">2018-09-23</time>
</div>

<div class="meta__item-categories meta__item">
	<svg class="meta__icon icon icon-category" width="16" height="16" viewBox="0 0 16 16"><path d="m7 2l1 2h8v11h-16v-13z"/></svg>
	<span class="meta__text"><a class="meta__link" href="/categories/linux" rel="category">linux</a></span>
</div>
</div>
	</header>
	<div class="content list__excerpt post__content clearfix">
		安装依赖库 yum -y install gcc automake autoconf libtool make
安装 cat &gt;&gt; rinetd-installer.sh &lt;&lt;'EOF' #!/bin/bash wget http://www.boutell.com/rinetd/http/rinetd.tar.gz tar zxvf rinetd.tar.gz cd rinetd mkdir -p /usr/man/man8 make &amp;&amp; make install EOF chmod +x rinetd-installer.sh ./rinetd-installer.sh  配置 rm -f /etc/rinetd.conf cat &gt;&gt; /etc/rinetd.conf &lt;&lt;EOF # 设置允许访问的ip地址信息 allow 192.168.1.* # 设置日志文件路径 # logfile /var/log/rinetd.log # 例子: 将本机 8080 端口重定向至 www.baidu.com 的 80 端口 # 0.0.0.0 8080 www.baidu.com 80 EOF  启动 cat &gt;&gt; /etc/init.
	</div>
	<div class="list__footer clearfix">
		<a class="list__footer-readmore btn" href="/post/2018-09-23-rinetd-%E8%BD%AC%E5%8F%91/">Read more…</a>
	</div>
</article><article class="list__item post">
	<header class="list__header">
		<h3 class="list__title post__title ">
			<a href="/post/2018-09-21-centos%E5%8D%87%E7%BA%A7%E5%86%85%E6%A0%B8/" rel="bookmark">
			centos升级内核
			</a>
		</h3>
		<div class="list__meta meta">
<div class="meta__item-datetime meta__item">
	<svg class="meta__icon icon icon-time" width="16" height="14" viewBox="0 0 30 28"><path d="M15 0C7 0 1 6 1 14s6 14 14 14 14-6 14-14S23 0 15 0zm0 25C9 25 4 20 4 14S9 3 15 3s11 5 11 11-5 11-11 11zm1-18h-2v8.4l6.8 4.4L22 18l-6-3.8V7z"/></svg>
	<time class="meta__text" datetime="2018-09-21T00:00:00">2018-09-21</time>
</div>

<div class="meta__item-categories meta__item">
	<svg class="meta__icon icon icon-category" width="16" height="16" viewBox="0 0 16 16"><path d="m7 2l1 2h8v11h-16v-13z"/></svg>
	<span class="meta__text"><a class="meta__link" href="/categories/linux" rel="category">linux</a></span>
</div>
</div>
	</header>
	<div class="content list__excerpt post__content clearfix">
		升级centos系统内核 https://www.howtoforge.com/tutorial/how-to-upgrade-kernel-in-centos-7-server/
# ==== 查看信息 ==== # step 1 yum -y update # 安装镜像插件，加速下载 yum -y install yum-plugin-fastestmirror # step 2 # 查看centos版本 cat /etc/redhat-release cat /etc/os-release # 查看主机详情 uname -a # ==== 主要 ==== # step 3 # 添加镜像源地址 rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm yum repolist # step 4 # 开启新加的elrepo-kernel源可用，并安装内核 yum -y --enablerepo=elrepo-kernel install kernel-ml # 查看源列表 yum repolist all # step 5 # 查看有多少个版本内核 sudo awk -F\' '$1==&quot;menuentry &quot; {print i++ &quot; : &quot; $2}' /etc/grub2.
	</div>
	<div class="list__footer clearfix">
		<a class="list__footer-readmore btn" href="/post/2018-09-21-centos%E5%8D%87%E7%BA%A7%E5%86%85%E6%A0%B8/">Read more…</a>
	</div>
</article>
</main>

<div class="pagination">
	<a class="pagination__item pagination__item--prev btn" href="/post/">«</a>
	<span class="pagination__item pagination__item--current">2/3</span>
	<a class="pagination__item pagination__item--next btn" href="/post/page/3/">»</a>
</div>


			</div>
			
<aside class="sidebar sidebar--left"><div class="widget-search widget">
	<form class="widget-search__form" role="search" method="get" action="https://google.com/search">
		<label>
			<input class="widget-search__field" type="search" placeholder="SEARCH..." value="" name="q" aria-label="SEARCH...">
		</label>
		<input class="widget-search__submit" type="submit" value="Search">
		<input type="hidden" name="sitesearch" value="/" />
	</form>
</div>
<div class="widget-recent widget">
	<h4 class="widget__title">Recent Posts</h4>
	<div class="widget__content">
		<ul class="widget__list">
			<li class="widget__item"><a class="widget__link" href="/post/2020-06-06-%E6%B8%B8%E6%88%8F/">游戏</a></li>
			<li class="widget__item"><a class="widget__link" href="/post/2020-05-28-mysql%E4%B8%BB%E4%BB%8E/">mysql主从</a></li>
			<li class="widget__item"><a class="widget__link" href="/post/2020-05-27-mysql%E6%89%A7%E8%A1%8C%E8%AE%A1%E5%88%92/">mysql执行计划</a></li>
		</ul>
	</div>
</div>
<div class="widget-categories widget">
	<h4 class="widget__title">Categories</h4>
	<div class="widget__content">
		<ul class="widget__list">
			<li class="widget__item"><a class="widget__link" href="/categories/bigdata">Bigdata</a></li>
			<li class="widget__item"><a class="widget__link" href="/categories/hadoop">Hadoop</a></li>
			<li class="widget__item"><a class="widget__link" href="/categories/install">Install</a></li>
			<li class="widget__item"><a class="widget__link" href="/categories/java">Java</a></li>
			<li class="widget__item"><a class="widget__link" href="/categories/linux">Linux</a></li>
			<li class="widget__item"><a class="widget__link" href="/categories/markdown">Markdown</a></li>
			<li class="widget__item"><a class="widget__link" href="/categories/monitor">Monitor</a></li>
			<li class="widget__item"><a class="widget__link" href="/categories/search">Search</a></li>
			<li class="widget__item"><a class="widget__link" href="/categories/tips">Tips</a></li>
			<li class="widget__item"><a class="widget__link" href="/categories/%e6%95%b0%e6%8d%ae%e5%ba%93">数据库</a></li>
			<li class="widget__item"><a class="widget__link" href="/categories/%e6%b8%b8%e6%88%8f">游戏</a></li>
		</ul>
	</div>
</div>
<div class="widget-taglist widget">
	<h4 class="widget__title">Tags</h4>
	<div class="widget__content">
		<a class="widget-taglist__link widget__link btn" href="/tags/awk" title="Awk">Awk (1)</a>
		<a class="widget-taglist__link widget__link btn" href="/tags/centos" title="Centos">Centos (1)</a>
		<a class="widget-taglist__link widget__link btn" href="/tags/github" title="Github">Github (1)</a>
		<a class="widget-taglist__link widget__link btn" href="/tags/google" title="Google">Google (1)</a>
		<a class="widget-taglist__link widget__link btn" href="/tags/hadoop" title="Hadoop">Hadoop (1)</a>
		<a class="widget-taglist__link widget__link btn" href="/tags/hdfs" title="Hdfs">Hdfs (1)</a>
		<a class="widget-taglist__link widget__link btn" href="/tags/hugo" title="Hugo">Hugo (1)</a>
		<a class="widget-taglist__link widget__link btn" href="/tags/java" title="Java">Java (1)</a>
		<a class="widget-taglist__link widget__link btn" href="/tags/jekyll" title="Jekyll">Jekyll (1)</a>
		<a class="widget-taglist__link widget__link btn" href="/tags/mongodb" title="Mongodb">Mongodb (3)</a>
		<a class="widget-taglist__link widget__link btn" href="/tags/mysql" title="Mysql">Mysql (4)</a>
		<a class="widget-taglist__link widget__link btn" href="/tags/spring" title="Spring">Spring (1)</a>
		<a class="widget-taglist__link widget__link btn" href="/tags/vim" title="Vim">Vim (1)</a>
		<a class="widget-taglist__link widget__link btn" href="/tags/yarn" title="Yarn">Yarn (1)</a>
		<a class="widget-taglist__link widget__link btn" href="/tags/%e4%bc%91%e9%97%b2" title="休闲">休闲 (1)</a>
		<a class="widget-taglist__link widget__link btn" href="/tags/%e5%b7%a5%e5%85%b7" title="工具">工具 (1)</a>
		<a class="widget-taglist__link widget__link btn" href="/tags/%e7%94%a8%e6%88%b7%e7%ae%a1%e7%90%86" title="用户管理">用户管理 (1)</a>
		<a class="widget-taglist__link widget__link btn" href="/tags/%e7%9b%91%e6%8e%a7" title="监控">监控 (1)</a>
		<a class="widget-taglist__link widget__link btn" href="/tags/%e8%b5%84%e6%96%99" title="资料">资料 (1)</a>
		<a class="widget-taglist__link widget__link btn" href="/tags/%e8%bd%ac%e5%8f%91" title="转发">转发 (1)</a>
		<a class="widget-taglist__link widget__link btn" href="/tags/%e8%bd%af%e4%bb%b6" title="软件">软件 (1)</a>
	</div>
</div>
<div class="widget-social widget">
	<h4 class="widget-social__title widget__title">Social</h4>
	<div class="widget-social__content widget__content">
		<div class="widget-social__item widget__item">
			<a class="widget-social__link widget__link btn" title="GitHub" rel="noopener noreferrer" href="https://github.com/chenjipdc" target="_blank">
				<svg class="widget-social__link-icon icon icon-github" width="24" height="24" viewBox="0 0 384 374"><path d="m192 0c-106.1 0-192 85.8-192 191.7 0 84.7 55 156.6 131.3 181.9 9.6 1.8 13.1-4.2 13.1-9.2 0-4.6-.2-16.6-.3-32.6-53.4 11.6-64.7-25.7-64.7-25.7-8.7-22.1-21.3-28-21.3-28-17.4-11.9 1.3-11.6 1.3-11.6 19.3 1.4 29.4 19.8 29.4 19.8 17.1 29.3 44.9 20.8 55.9 15.9 1.7-12.4 6.7-20.8 12.2-25.6-42.6-4.8-87.5-21.3-87.5-94.8 0-20.9 7.5-38 19.8-51.4-2-4.9-8.6-24.3 1.9-50.7 0 0 16.1-5.2 52.8 19.7 15.3-4.2 31.7-6.4 48.1-6.5 16.3.1 32.7 2.2 48.1 6.5 36.7-24.8 52.8-19.7 52.8-19.7 10.5 26.4 3.9 45.9 1.9 50.7 12.3 13.4 19.7 30.5 19.7 51.4 0 73.7-44.9 89.9-87.7 94.6 6.9 5.9 13 17.6 13 35.5 0 25.6-.2 46.3-.2 52.6 0 5.1 3.5 11.1 13.2 9.2 76.2-25.5 131.2-97.3 131.2-182 0-105.9-86-191.7-192-191.7z"/></svg>
				<span>GitHub</span>
			</a>
		</div>
		<div class="widget-social__item widget__item">
			<a class="widget-social__link widget__link btn" title="Email" href="mailto:chenjipdc@gmail.com">
				<svg class="widget-social__link-icon icon icon-mail" width="24" height="24" viewBox="0 0 416 288"><path d="m0 16v256 16h16 384 16v-16-256-16h-16-384-16zm347 16-139 92.5-139-92.5zm-148 125.5 9 5.5 9-5.5 167-111.5v210h-352v-210z"/></svg>
				<span>chenjipdc@gmail.com</span>
			</a>
		</div>
	</div>
</div>
</aside>
		</div>
		<footer class="footer">
	<div class="container footer__container flex">
		
		<div class="footer__copyright">
			&copy; 2020 pdc.
			<span class="footer__copyright-credits">Generated with <a href="https://gohugo.io/" rel="nofollow noopener" target="_blank">Hugo</a> and <a href="https://github.com/Vimux/Mainroad/" rel="nofollow noopener" target="_blank">Mainroad</a> theme.</span>
		</div>
	</div>
</footer>
	</div>
<script async defer src="/js/menu.js"></script></body>
</html>